<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j">
    <f:view>
        <h:head>
            <title>User Login Form</title>
            <link href="mycss.css" rel="stylesheet" type="text/css"/>
        </h:head>
        <h:body>
            <h:form  styleClass="login" id="loginForm">                
                <h:outputLabel value="#{msg.loginTitle}"/>
                <h:panelGroup  binding="#{loginController.errorPanel}" rendered="false">
                    <h:panelGrid columns="3">
                        <h:outputText styleClass="loginNotCorrect" value="Login not correct"/>
                    </h:panelGrid>
                </h:panelGroup>
                <h:panelGrid columns="3">
                    <h:outputLabel value="#{msg.loginName}" for="loginName"/>
                    <h:inputText id="loginName" value="#{loginController.login.loginName}" binding="#{loginController.nameInput}" required="true" requiredMessage="required"/>
                    <h:message for="loginName" showSummary="true" showDetail="false"/>

                    <h:outputLabel value="#{msg.loginPass}" for="loginPass"/>
                    <h:inputSecret id="loginPass" value="#{loginController.login.loginPass}" binding="#{loginController.passInput}" required="true" requiredMessage="required"/>
                    <h:message for="loginPass" showSummary="true" showDetail="false"/>

                    <h:commandButton action="#{loginController.registration()}"  value="#{msg.BReg}" immediate="true"/>
                    <h:commandButton action="#{loginController.validate()}"  value="#{msg.BLogin}"></h:commandButton>
                </h:panelGrid>
            </h:form>
        </h:body>
    </f:view>
</html>
